﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.DTO
{
    /// <summary>
    /// 分页返回dto
    /// </summary>
    /// <typeparam name="T">当前页返回的数据类型</typeparam>
    public class PageDTO<T>
    {
        /// <summary>
        /// 当前页返回的数据
        /// </summary>
        public IQueryable<T> plist { get; set; }
        /// <summary>
        /// 总数据条数
        /// </summary>
        public int recordCount { get; set; }

        public PageDTO() { }
        /// <summary>
        /// 为分页属性初始化赋值
        /// </summary>
        /// <param name="plist">当前页返回的数据</param>
        /// <param name="recordCount">总数据条数</param>
        public PageDTO(IQueryable<T> plist,int recordCount)
        {
            this.plist = plist;
            this.recordCount = recordCount;
        }
    }
}
